#ifndef WEBENGINEVIEW_H
#define WEBENGINEVIEW_H
#include <QObject>
#include <QWidget>
#include <QWebEngineView>
#include <QWebEnginePage>
#include <QLabel>
#include <QWebEngineProfile>
class WebEngineView : public QWebEngineView{
//    Q_OBJECT
public:
    WebEngineView();
    ~WebEngineView();
    bool isNewWindow;
    WebEngineView* p;
    QLabel* Label_Error;
    QWebEngineProfile profile;

    int newWindowType;
    //    void QWebEngineProfile::downloadRequested(QWebEngineDownloadItem *download);
private:
    WebEngineView* createWindow(QWebEnginePage::WebWindowType type);

signals:
    void newWindow(QUrl);
public slots:
    void onUrlChanged(QUrl,int type);
};

#endif // WEBENGINEVIEW_H
